package router

import (
	"github.com/gin-gonic/gin"
	apis "vrcm/src/vrcm/app/admin/apis/monitor"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerMonitorBasicRouter)
}

// registerMonitorBasicRouter
func registerMonitorBasicRouter(v1 *gin.RouterGroup) {
	api := apis.MonitorBasic{}
	r := v1.Group("/monitor")
	{
		r.POST("/get-list", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("/inset", api.Insert)
		r.POST("/save-monitor", api.SaveMonitor)
		r.POST("/save-monitor-config", api.SaveMonitorConfig)
		r.GET("/get-monitor-config/:id", api.GetMonitorConfig)
		r.POST("/delete", api.Delete)
		r.POST("/start-monitor", api.StartMonitor)
		r.POST("/stop-monitor", api.StopMonitor)
		r.POST("/create-share", api.CreateShare)
		r.POST("/get-share-info", api.GetShareInfoByUuid)
		r.POST("/reset-monitor", api.ResetMonitorConfig)
		r.POST("/get-by-event-id", api.GetByEventId)
	}
}
